import {createRouter, createWebHistory} from 'vue-router'
import logIn from '../views/logIn.vue'
import  index from '../views/index.vue'
const routes = [
    {
        path: '',
        name: 'logIn',
        component: logIn
    },


    {
        path: '/index',
        name: 'Index',
        component:index,
        children: [
            // 上传文章
            {
                path: '/article',
                name: 'article',
                component: () => import('../views/article.vue'),
            },
            // 文章列表
            {
                path: '/ListArticles',
                name: 'ListArticles',
                component: () => import('../views/ListArticles.vue'),
            },
            // 文章详情
            {
                path: '/particulars',
                name: 'particulars',
                component: () => import('../views/particulars.vue'),
            },
            {
                path: '/aa',
                name: 'aa',
                component: () => import('../views/aa.vue'),
            },
            {
                path: '/largeSize',
                name: 'largeSize',
                component: () => import('../views/largeSize.vue'),
            },
            {
                path: '/measurement',
                component: () => import('../views/data/measurement.vue'),
            },
            {
                path: '/moodIndex',
                name: 'moodIndex',
                component: () => import('../views/data/moodIndex.vue'),
            },

        ]
    },

]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
